package com.mask.im.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mask.im.business.common.model.PageResult;
import com.mask.im.business.model.dto.*;
import com.mask.im.business.model.entity.chat.IMFriendChatMessageDO;
import com.mask.im.business.model.vo.IMFriendChatMessageVO;
import com.mask.im.business.model.vo.RecommendVO;
import com.mask.im.business.common.model.RestResponse;
import com.mask.im.business.model.vo.TransferMoneyVO;

import java.util.List;

/**
 * 好友聊天记录
 *
 * @author jian
 */
public interface IMFriendChatMessageService extends IService<IMFriendChatMessageDO> {

    /**
     * 发送消息
     *
     * @param sendMessageDTO
     * @return
     */
    RestResponse<IMFriendChatMessageDO> sendMessage(FriendSendMessageDTO sendMessageDTO);

    /**
     * 获取聊天记录
     *
     * @param friendId
     * @return
     */
    RestResponse<List<IMFriendChatMessageVO>> chatMessageList(Long friendId);


    void saveChat(IMFriendChatMessageDO imFriendChatMessage);

    RestResponse<List<FriendChatMessageDTO>> getChatMessageList(Long friendId);

    RestResponse<String> clearChatMessage(Long friendId);

    RestResponse<Integer> deleteChatMessage(Integer chatId);

    RestResponse<String> sendRecommendFriends(RecommendVO recommendVO);

    PageResult<AdminChatMessageDTO> chatMessage(String sender, String receiver);

    RestResponse<String> viewContent(Integer id, String password, String type);

    RestResponse<String> transferMoney(TransferMoneyVO transferMoneyVO);

    /**
     * 消息已读
     *
     * @param messageReadDTO
     * @return
     */
    RestResponse<?> messageRead(MessageReadDTO messageReadDTO);

    /**
     * 根据消息类型获取对应的消息
     *
     * @param messageId
     * @return
     */
    IMFriendChatMessageDO getChatMessageById(Integer messageId);

    /**
     * 消息撤回
     *
     * @param id
     * @return
     */
    RestResponse<IMFriendChatMessageDO> retractMessage(Long id);
}

